package com.zstu.mall.entity;

import com.zstu.mall.common.BaseEntity;
import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

/**
 * @author     : wuyc
 * @description: user
 * @date       : Created in 2019/11/24
 */
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Table(name = "user")
public class User extends BaseEntity implements Serializable {

	/**
	 * 姓名
	 * default value: ' '
	 */
	@Column(name = "name", nullable = false,length = 255)
	private String name;

	/**
	 * 登录密码
	 * default value: '0'
	 */
	@Column(name = "password", nullable = false,length = 255)
	private String password;

	/**
	 * 支付密码
	 * default value: '0'
	 */
	@Column(name = "paypassword", nullable = false,length = 255)
	private String paypassword;

	/**
	 * 1为男0为女
	 * default value: '1'
	 */
	@Column(name = "sex", nullable = false,length = 255)
	private String sex;

	/**
	 * 年龄
	 * default value: 18
	 */
	@Column(name = "age", nullable = false,length = 50)
	private Double age;

	/**
	 * 证件号
	 * default value: ' '
	 */
	@Column(name = "idcard", nullable = false,length = 255)
	private String idcard;

	/**
	 * 同一邮箱只和绑定一个账号,允许解绑(如有手机)
	 * default value: ' '
	 */
	@Column(name = "email", nullable = false,length = 255)
	private String email;

	/**
	 * 同一手机只和绑定一个账号,允许解绑(如有email)
	 * default value: ' '
	 */
	@Column(name = "telephone", nullable = false,length = 255)
	private String telephone;

	/**
	 * 生日
	 * default value: ' '
	 */
	@Column(name = "birthday", nullable = false,length = 255)
	private String birthday;

	/**
	 * 收货地址1(姓名,号码,具体地址)
	 * default value: ' '
	 */
	@Column(name = "address1", nullable = false,length = 255)
	private String address1;

	/**
	 * 收货地址2
	 * default value: ' '
	 */
	@Column(name = "address2", nullable = false,length = 255)
	private String address2;

	/**
	 * 收货地址3
	 * default value: ' '
	 */
	@Column(name = "address3", nullable = false,length = 255)
	private String address3;

	/**
	 * 密保问题，用于重置密码
	 * default value: '1'
	 */
	@Column(name = "encrypted_problem1", nullable = false,length = 255)
	private String encryptedProblem1;

	/**
	 * null
	 * default value: '2'
	 */
	@Column(name = "encrypted_problem2", nullable = false,length = 255)
	private String encryptedProblem2;

	/**
	 * null
	 * default value: '3'
	 */
	@Column(name = "encrypted_problem3", nullable = false,length = 255)
	private String encryptedProblem3;

	/**
	 * 密保回答
	 * default value: ' '
	 */
	@Column(name = "encrypted_answer1", nullable = false,length = 255)
	private String encryptedAnswer1;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "encrypted_answer2", nullable = false,length = 255)
	private String encryptedAnswer2;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "encrypted_answer3", nullable = false,length = 255)
	private String encryptedAnswer3;

	/**
	 * 备用字段1
	 * default value: ' '
	 */
	@Column(name = "string1", nullable = false,length = 255)
	private String string1;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "string2", nullable = false,length = 255)
	private String string2;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "string3", nullable = false,length = 255)
	private String string3;

	public User() {
		super();
		super.status = "1";
		super.remark = " ";
		super.gmtCreate = new Date();
		super.gmtModified = new Date();
		this.name = " ";
		this.password = "0";
		this.paypassword = "0";
		this.sex = "1";
		this.age = 18.0;
		this.idcard = " ";
		this.email = " ";
		this.telephone = " ";
		this.birthday = " ";
		this.address1 = " ";
		this.address2 = " ";
		this.address3 = " ";
		this.encryptedProblem1 = "1";
		this.encryptedProblem2 = "2";
		this.encryptedProblem3 = "3";
		this.encryptedAnswer1 = " ";
		this.encryptedAnswer2 = " ";
		this.encryptedAnswer3 = " ";
		this.string1 = " ";
		this.string2 = " ";
		this.string3 = " ";
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getPassword() {
		return this.password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getPaypassword() {
		return this.paypassword;
	}
	
	public void setPaypassword(String paypassword) {
		this.paypassword = paypassword;
	}
	
	public String getSex() {
		return this.sex;
	}
	
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public Double getAge() {
		return this.age;
	}
	
	public void setAge(Double age) {
		this.age = age;
	}
	
	public String getIdcard() {
		return this.idcard;
	}
	
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	
	public String getEmail() {
		return this.email;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getTelephone() {
		return this.telephone;
	}
	
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	public String getBirthday() {
		return this.birthday;
	}
	
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	
	public String getAddress1() {
		return this.address1;
	}
	
	public void setAddress1(String address1) {
		this.address1 = address1;
	}
	
	public String getAddress2() {
		return this.address2;
	}
	
	public void setAddress2(String address2) {
		this.address2 = address2;
	}
	
	public String getAddress3() {
		return this.address3;
	}
	
	public void setAddress3(String address3) {
		this.address3 = address3;
	}
	
	public String getEncryptedProblem1() {
		return this.encryptedProblem1;
	}
	
	public void setEncryptedProblem1(String encryptedProblem1) {
		this.encryptedProblem1 = encryptedProblem1;
	}
	
	public String getEncryptedProblem2() {
		return this.encryptedProblem2;
	}
	
	public void setEncryptedProblem2(String encryptedProblem2) {
		this.encryptedProblem2 = encryptedProblem2;
	}
	
	public String getEncryptedProblem3() {
		return this.encryptedProblem3;
	}
	
	public void setEncryptedProblem3(String encryptedProblem3) {
		this.encryptedProblem3 = encryptedProblem3;
	}
	
	public String getEncryptedAnswer1() {
		return this.encryptedAnswer1;
	}
	
	public void setEncryptedAnswer1(String encryptedAnswer1) {
		this.encryptedAnswer1 = encryptedAnswer1;
	}
	
	public String getEncryptedAnswer2() {
		return this.encryptedAnswer2;
	}
	
	public void setEncryptedAnswer2(String encryptedAnswer2) {
		this.encryptedAnswer2 = encryptedAnswer2;
	}
	
	public String getEncryptedAnswer3() {
		return this.encryptedAnswer3;
	}
	
	public void setEncryptedAnswer3(String encryptedAnswer3) {
		this.encryptedAnswer3 = encryptedAnswer3;
	}
	
	public String getString1() {
		return this.string1;
	}
	
	public void setString1(String string1) {
		this.string1 = string1;
	}
	
	public String getString2() {
		return this.string2;
	}
	
	public void setString2(String string2) {
		this.string2 = string2;
	}
	
	public String getString3() {
		return this.string3;
	}
	
	public void setString3(String string3) {
		this.string3 = string3;
	}

	@Override
	public String toString() {
		return "User{" +
				"name='" + name + '\'' +
				", password='" + password + '\'' +
				", paypassword='" + paypassword + '\'' +
				", sex='" + sex + '\'' +
				", age=" + age +
				", idcard='" + idcard + '\'' +
				", email='" + email + '\'' +
				", telephone='" + telephone + '\'' +
				", birthday='" + birthday + '\'' +
				", address1='" + address1 + '\'' +
				", address2='" + address2 + '\'' +
				", address3='" + address3 + '\'' +
				", encryptedProblem1='" + encryptedProblem1 + '\'' +
				", encryptedProblem2='" + encryptedProblem2 + '\'' +
				", encryptedProblem3='" + encryptedProblem3 + '\'' +
				", encryptedAnswer1='" + encryptedAnswer1 + '\'' +
				", encryptedAnswer2='" + encryptedAnswer2 + '\'' +
				", encryptedAnswer3='" + encryptedAnswer3 + '\'' +
				", string1='" + string1 + '\'' +
				", string2='" + string2 + '\'' +
				", string3='" + string3 + '\'' +
				", id='" + id + '\'' +
				", gmtCreate=" + gmtCreate +
				", gmtModified=" + gmtModified +
				", status='" + status + '\'' +
				", remark='" + remark + '\'' +
				'}';
	}

}
